<?php
/**
 * This file is form http://findcat.cn
 *
 * @link     https://findcat.cn
 * @email    1476982312@qq.com
 */
namespace Blog\Seeder\Admin\Permission;

use Illuminate\Database\Seeder;
use Database\Seeder\PermissionSeederMaker;

/**
 * 系统原有权限创建.
 *
 * Class AdminManagerPermissionSeeder
 */
class AdminManagerPermissionSeeder extends Seeder
{
    use PermissionSeederMaker;

    public function run()
    {
        $this->createPermissions('所有权限', '*', '', '*');

        $this->createPermissions('Dashboard', 'dashboard', '', '/dashboard');

        $this->createPermissions('登录', 'login', '', '/login');

        $this->createPermissions('退出登录', 'logout', '', '/logout');

        $this->createPermissions('修改信息', 'setting', '', '/setting');

        $this->createPermissions('角色列表', 'management', '', '/roles');
        $this->createPermissions('角色编辑', 'management.edit', '', '/roles/*/edit');
        $this->createPermissions('角色创建', 'management.create', '', '/roles/create');

        $this->createPermissions('权限列表', 'permissions', '', '/permissions');
        $this->createPermissions('权限编辑', 'permissions.edit', '', '/permissions/*/edit');
        $this->createPermissions('权限创建', 'permissions.create', '', '/permissions/create');

        $this->createPermissions('菜单列表', 'menu', '', '/menu');
        $this->createPermissions('菜单编辑', 'menu.edit', '', '/menu/*/edit');
        $this->createPermissions('菜单创建', 'menu.create', '', '/menu/create');

        $this->createPermissions('操作日志', 'logs', '', '/logs');
    }
}
